@extends('default.layouts.english.companyPublic')

@section('title', '新增职位')
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/company/form.css')}}">

@endsection

@section('rightcon')

    <div class="right">
        <form name="jobform" id="jobform" onSubmit="return false" method="post">
            {!! csrf_field() !!}
            <div class="contitle">
                <div class="titletext">
                    <i></i><span class="left">{{trans('english.TheNew')}}</span>
                </div>
            </div>
            <div class="consection">
                <div class="title">
                    <span>{{trans('english.Position')}}</span><em></em>
                </div>
                {{--输出全部错误信息--}}
                @if(count($errors)>0)
                    <div class="errors" style=" margin-top: 15px">
                        <ul>
                            @if(is_object($errors))
                                @foreach($errors->all() as $error)
                                    <li><span>{{$error}}</span></li>
                                @endforeach
                            @else
                                <li><span>{{$error}}</span></li>
                            @endif
                        </ul>
                    </div>
                @endif
                <dl>
                    <dt><em>*</em><span>{{trans('english.JobName')}}</span></dt>
                    <dd><input name="job_title" type="text" id="job_title" style="width:300px;" value="{{old('job_title')}}"></dd>
                    <input id="part_status" name="part_status" value="{{old('part_status')}}" type="hidden">
                    <div id="part_status_select" class="select" style="float:left; margin-left:3px; height: 32px; ">
                        <span><a>{{trans('english.Please')}}</a></span><i></i></div>
                    <dd class="errinfo"></dd>
                </dl>
                <dl>
                    <dt><em></em><span>{{trans('english.department')}}</span></dt>
                    <dd>
                        <input id="department" name="department" type="hidden" value="{{old('department')}}">
                        <div id="department_select" class="select" style="float:left;width:200px;">
                            <span><a>{{trans('english.Please')}}</a></span><i></i></div>
                        <a class="option_add"></a>
                    </dd>
                    <dd></dd>
                </dl>
                <dl>
                    <dt><em>*</em><span>{{trans('english.industry')}}</span></dt>
                    <dd>
                        <input id="industry" name="industry" value="{{$companyBasic->industry or ''}}" type="hidden">
                        <div id="industry_select" class="select" style=" width:300px"><span><a>{{trans('english.Please')}}</a></span><i></i>
                        </div>
                    </dd>
                    <dd class="errinfo"></dd>
                </dl>
                <dl>
                    <dt><em>*</em><span>{{trans('english.jobCategory')}}</span></dt>
                    <dd>
                        <input name="job_category1" type="hidden" id="job_category1" value="{{old('job_category1')}}">
                        <input name="job_category2" type="hidden" id="job_category2" value="{{old('job_category2')}}">
                        <input name="job_category3" type="hidden" id="job_category3" value="{{old('job_category3')}}">
                        <input name="job_category4" type="hidden" id="job_category4" value="{{old('job_category4')}}">
                        <input name="job_category5" type="hidden" id="job_category5" value="{{old('job_category5')}}">
                         <span class="jList" onClick="posCateInput2('')">
                                <input type="text" name="jobsort" class="input" id="jobsort" value="{{old('jobsort')}}"
                                       readonly style="cursor: text"
                                       placeholder="{{trans('english.PleaseJob')}}"/>
                                <i></i>
                         </span>
                    </dd>
                    <dd class="errinfo"></dd>
                </dl>
                <dl>
                    <dt><em>*</em><span>{{trans('english.operational')}}</span></dt>
                    <dd><input name="location1" type="hidden" id="location1"
                               value="{{$companyBasic->region or old('location1')}}">
                        <input name="location2" type="hidden" id="location2" value="{{old('location2')}}">
                        <input name="location3" type="hidden" id="location3" value="{{old('location3')}}">
                        <input name="location4" type="hidden" id="location4" value="{{old('location4')}}">
                        <input name="location5" type="hidden" id="location5" value="{{old('location5')}}">
                        <span class="jList" onClick="workplaceInput2('','type')">
                            <input type="text" name="workplace" class="input" id="workplace"
                                   value="{{$companyBasic->cn_region or old('workplace')}}" readonly
                                   style="cursor: text"
                                   placeholder="{{trans('english.PleaseArea')}}"/>
                             <i></i>
                        </span>
                    </dd>
                    <dd class="errinfo"></dd>
                </dl>
                <dl>
                    <dt><em>*</em><span>{{trans('english.Recruit')}}</span></dt>
                    <dd><input name="recruiting_num" type="text" id="recruiting_num" style="width:80px;" value="{{old('recruiting_num')}}"
                               placeholder="0 on behalf"> people
                    </dd>
                    <dd class="errinfo"></dd>
                </dl>
                <dl>
                    <dt><em>*</em><span>{{trans('english.Salary')}}</span></dt>
                    <dd>
                        <input id="salary_above" name="salary_above" type="hidden" value="{{old('salary_above')}}">
                        <div id="salary_above_select" class="select" style="float:left"><span><a>{{trans('english.Please')}}</a></span><i></i>
                        </div>
                        <div class="selectTo">-</div>
                        <input id="salary_below" name="salary_below" type="hidden" value="{{old('salary_below')}}">
                        <div id="salary_below_select" class="select" style="float:left"><span><a>{{trans('english.Please')}}</a></span><i></i>
                        </div>
                    </dd>
                    <dd class="errinfo"></dd>
                </dl>
                <dl>
                    <dt><em>*</em><span>{{trans('english.temptation')}}</span></dt>
                    <dd>
                    	 <span class="selTemptation" id="selTemptation">
                                        <input name="welfare" value="{{$companyBasic->temptation or old('temptation')}}"
                                               id="welfare" type="hidden">
                                        <input type="text" class="input" name="showTemptation" id="showTemptation"
                                               value="{{$companyBasic->temptation or old('temptation')}}" readonly
                                               placeholder="The bag eats, encase, five social insurance and one housing fund, the boss who is good">
                                        <i class="yicon"></i>
                        </span>
                    </dd>
                    <dd class="errinfo"></dd>
                </dl>
                <dl style="height:99px; margin-top:20px;">
                    <dt><em>*</em><span>{{trans('english.desc')}}</span></dt>
                    <dd><textarea name="description" id="description" style="width:536px; height:99px;"
                                  placeholder="{{trans('english.Fill')}}">{{old('description')}}</textarea></dd>
                    <dd class="errinfo"></dd>
                </dl>
            </div>
            <div class="consection">
                <div class="title">
                    <span>{{trans('english.condition')}}</span><em></em>
                </div>
                <dl>
                    <dt><em></em><span>{{trans('english.education')}}</span></dt>
                    <dd>
                        <input id="education" name="education" type="hidden" value="{{old('education')}}">
                        <div id="education_select" class="select" style="float:left"><span><a>{{trans('english.Please')}}</a></span><i></i>
                        </div>
                    </dd>
                    <dt><em></em><span>{{trans('english.experience')}}</span></dt>
                    <dd>
                        <input id="work_year" name="work_year" type="hidden" value="{{old('work_year')}}">
                        <div id="work_year_select" class="select" style="float:left"><span><a>{{trans('english.Please')}}</a></span><i></i>
                        </div>
                    </dd>
                    <dd></dd>
                </dl>
                <dl>
                    <dt><em></em><span>{{trans('english.sex')}}</span></dt>
                    <dd>
                        <input id="gender" name="gender" type="hidden" value="{{old('gender')}}">
                        <div id="gender_select" class="select" style="float:left"><span><a>{{trans('english.Please')}}</a></span><i></i></div>
                    </dd>
                    <dt style="width:72px;"><em></em><span>{{trans('english.language')}}</span></dt>
                    <dd>
                        <input id="language" name="language" type="hidden" value="{{old('language')}}">
                        <div id="language_select" class="select" style="float:left"><span><a>{{trans('english.Please')}}</a></span><i></i></div>
                    </dd>
                    <dd></dd>
                </dl>
                <dl>
                    <dt><em></em><span>{{trans('english.age')}}</span></dt>
                    <dd>
                        <input id="age_above" name="age_above" type="hidden" value="{{old('age_above')}}">
                        <div id="age_above_select" class="select" style="float:left"><span><a>{{trans('english.Please')}}</a></span><i></i>
                        </div>
                        <div class="selectTo">-</div>
                        <input id="age_below" name="age_below" type="hidden" value="{{old('age_below')}}">
                        <div id="age_below_select" class="select" style="float:left"><span><a>{{trans('english.Please')}}</a></span><i></i>
                        </div>
                    </dd>
                    <dd class="errinfo"></dd>
                </dl>
            </div>
            <div class="consection">
                <div class="title">
                    <span>{{trans('english.contactWay')}}</span><em></em>
                </div>
                <div class="show" id="consection_show">
                    <dl>
                        <dt><em>*</em><span>{{trans('english.Contacts')}}</span></dt>
                        <dd><input name="contacts" type="text" id="contacts" value="{{$companyBasic->contacts or ''}}"
                                   style="width:120px;"></dd>
                        <dd class="errinfo"></dd>
                    </dl>
                    <dl>
                        <dt><em>*</em><span>{{trans('english.Phone')}}</span></dt>
                        <dd><input name="mobile" type="text" id="mobile" value="{{$companyBasic->mobile or ''}}"
                                   style="width:200px;"></dd>
                        <dd class="errinfo"></dd>
                    </dl>
                    <dl>
                        <dt><em>*</em><span>{{trans('english.number')}}</span></dt>
                        <dd><input name="phone" type="text" id="phone" value="{{$companyBasic->phone or ''}}"
                                   placeholder="Formats such as 0576-82441111" style="width:200px;"></dd>
                        <dd class="errinfo"></dd>
                    </dl>
                    <dl>
                        <dt><em></em><span>{{trans('english.Fax')}}</span></dt>
                        <dd><input name="fax" type="text" id="fax" value="{{$companyBasic->fax or ''}}"
                                   style="width:200px;"></dd>
                        <dd class="errinfo"></dd>
                    </dl>
                    <dl>
                        <dt><em></em><span>Email</span></dt>
                        <dd><input name="email" type="text" id="email" value="{{$companyBasic->email or ''}}"
                                   style="width:330px;"></dd>
                        <dd class="errinfo"></dd>
                    </dl>
                </div>
                <div class="set"><input name="contact_info" type="radio" id="contact_info0" value="0" checked="checked"><label
                            for="contact_info0">{{trans('english.Using')}}</label>
                    <input name="contact_info" id="contact_info1" value="1" type="radio"><label for="contact_info1">{{trans('english.current')}}</label>
                    <input name="contact_info" id="contact_info2" value="2" type="radio"><label for="contact_info2">{{trans('english.ind')}}</label>
                    <input name="contact_info" id="contact_info3" value="3" type="radio"><label for="contact_info3">{{trans('english.allows')}}</label>
                </div>
            </div>
            <div class="form_btn">
                <span><input id="lang_type" name="lang_type" value="en" type="hidden"></span>
                <span><input type="submit" name="publish" id="publish" value="{{trans('english.postJob')}}"></span>
                <span><a href="javascript:history.go(-1);">{{trans('english.cancel')}}</a></span>
            </div>
        </form>
    </div>
@endsection
@section('footerjs')
    @parent
    <script type="text/javascript" src="{{EnResources::jsOption('company')}}"></script>
    <script type="text/javascript" src="{{EnResources::jsOption('personal')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/jquery/enjquery.position.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/jquery/enjquery.area.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/jquery/jquery.form.js')}}"></script>
    <!--弹出层显示职位诱惑posTemptation插件-->
    <div class="showPosTemptation" id="showPosTemptation"></div>
    <script type="text/javascript" src="{{asset('/default/js/jquery/enjquery.posTemptation.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/jquery/jquery.validate.extend.js')}}"></script>
    <script type="text/javascript">

        $("#leftnav_job").addClass("active");
        $(function(){
            var option_department = [
                {"value": 0, "text": "Any department"}@if($companyDepartment->count() > 0 ),
                    @foreach($companyDepartment as $k=>$v)
                {
                    "value": "{{$v->id}}", "text": "{{$v->name}}"
                }@if(count($companyDepartment)!=($k+1)), @endif
                @endforeach
                @endif
            ]
            //部门
            var department_select = $("#department").select({
                optionData: option_department
                //defaults:null,
            });

            //兼职状态
            var part_status_select = $("#part_status").select({
                optionData: option_part_status
                //defaults:null
            });
            //行业
            var industry_select = $("#industry").select({
                optionData: option_industry
                //defaults:null,
            });
            //薪资待遇
            option_expectedsalary.unshift({"text": "Please select", "value": ''});
            var salary_above_select = $("#salary_above").select({
                optionData: option_expectedsalary,
                //defaults:null,
                callback: function(val, text){
                    $("#salary_above").valid();
                }
            });
            var salary_below_select = $("#salary_below").select({
                optionData: option_expectedsalary,
                //defaults:null,
                callback: function(val, text){
                    $("#salary_above").valid();
                }
            });

            //公司诱惑
            var comTemp = ["Weekend", "Bag eats", "Wrap", "Five", "Accumulation", "Annual", "Tourism", "Train", "Paid", "Holiday", "Regular", "Shuttle", "Overtime", "Traffic",
                "Telephone", "Esop", "Promotion", "8 hour work", "Project", "Many", "Office tall", "Staff", "Gym", "Activity", "With car"];
            $("#selTemptation").posTemptation({
                posArr: comTemp,                               //传入职位诱惑数组
                showPosTemptation: '#showPosTemptation',       //追加到什么位置
                posTemptation: "#welfare",                  //赋值到某个表单的值
                showTemptation: "#showTemptation",              //显示到某个表单的值
                ismod: '1'
            });
            //学历
            option_education.unshift({"text": "unlimited", "value": 0});
            var education_select = $("#education").select({
                optionData: option_education
                //defaults:null,
            });
            //相关经验
            option_work_year.unshift({"text": "unlimited", "value": 0});
            var work_year_select = $("#work_year").select({
                optionData: option_work_year
                //defaults:null,
            });
            //性别
            option_gender = [{"text": "Man", "value": 1},
                {"text": "Woman", "value": 2}]
            option_gender.unshift({"text": "unlimited", "value": 0});
            var gender_select = $("#gender").select({
                optionData: option_gender
                //defaults:null,
            });

            //语言
            option_language.unshift({"text": "unlimited", "value": 0});
            var language_select = $("#language").select({
                optionData: option_language
                //defaults:null,
            });
            //年龄
            option_age = [{"text": "unlimited", "value": 0}];
            for(var i = 16; i < 65; i++){
                option_age.push({"text": i + "Year", "value": i})
            }
            var age_above_select = $("#age_above").select({
                optionData: option_age
                //defaults:null,
            });
            var age_below_select = $("#age_below").select({
                optionData: option_age
                //defaults:null,
            });

            //---------------------------验证
            //企业会员手机号码验证
            $.validator.addMethod("checkMobile", function(value, element, param){
                var phone = $("#" + param[0]).val();
                phone = str_trim(phone);
                if(value == '' && phone == ''){
                    return false;
                }else{
                    return true;
                }
            }, "Please enter the correct cell phone number");

            //企业会员电话号码验证
            $.validator.addMethod("checkPhone", function(value, element, param){
                var phone = value;
                phone = str_trim(phone);
                if(phone != ''){
                    var regu = /(^[0-9]{2,5}\-[0-9]{7,9})((\-\d{0,10})?)$/g;
                    if(regu.test(phone)){
                        return true;
                    }else{
                        return false;
                    }
                }else{
                    return true;
                }
            }, "The correct telephone number format is 0576-82441111");

            //企业会员传真号码验证
            $.validator.addMethod("checkFax", function(value, element, param){
                if(value != ''){
                    var regu = /(^[0-9]{2,5}\-[0-9]{7,9})$/g;
                    if(regu.test(value)){
                        return true;
                    }else{
                        return false;
                    }
                }else{
                    return true;
                }
            }, "The correct fax number format is 0576-82442525");

            //验证薪资
            $.validator.addMethod("checkSalary", function(value, element, param){
                //console.log(param);
                if(parseInt(value) > parseInt($('#salary_below').val())){
                    return false;
                }else if($('#salary_below').val() == ''){
                    return false;
                }else{
                    return true;
                }
            }, "The salary package is from less to more");
            //验证年龄
            $.validator.addMethod("checkAge", function(value, element, param){
                //console.log(param);
                if(parseInt(value) > parseInt($('#age_below').val())){
                    return false;
                }else if($('#age_below').val() == ''){
                    return false;
                }else{
                    return true;
                }
            }, "The starting age must be greater than the end of age");

            //企业会员表单验证 使用jQuery Validate 插件进行验证
            $('#jobform').validate({
                //指定使用什么标签标记错误。
                errorElement: "span",
                //一个函数，可以自定义错误放到哪里。
                errorPlacement: function(error, element){
                    //console.log(element.attr("name"));
                    $(element).parents('dl').find(".errinfo").append(error);
                },
                //自定义错误消息
                tipPlacement: function(element, tip){
                    $(element).parents('dl').find(".errinfo").append(tip);
                },
                //通过验证后执行的函数
                success: function(label){
                    if(label.parents('dl').find('dd input').val() != ''){
                        label.text('ok!').addClass('success');
                    }
                },
                //未验证后执行的函数
                highlight: function(element, errorClass){
                    $(element).closest("dl").find("dd.errinfo").find('span').removeClass('success');
                },
                ignore: "",
                //薪资合并提示
                //groups: {
                //salary: "salary_above salary_below"   //只能验证一个取消使用
                //},
                //js上面添加验证规则
                rules: {
                    job_title: {
                        required: true
                    },
                    industry: {
                        required: true
                    },
                    jobsort1: {
                        required: true
                    },
                    jobarea1: {
                        required: true
                    },
                    recruiting_num: {
                        required: true
                    },
                    salary_above: {
                        required: true,
                        checkSalary: true
                    },
                    welfare: {
                        required: true
                    },
                    description: {
                        required: true
                    },
                    age_above: {
                        checkAge: true
                    }
                },
                //错误信息提示修改
                messages: {
                    job_title: {
                        required: "Please enter the job title"
                    },
                    industry: {
                        required: "Please choose your industry"
                    },
                    jobsort1: {
                        required: "Please select the job category"
                    },
                    jobarea1: {
                        required: "Please select the working area"
                    },
                    recruiting_num: {
                        required: "Please enter the number of recruiters"
                    },
                    salary_above: {
                        required: "Please select the salary package"
                    },
                    welfare: {
                        required: "Please select a welfare"
                    },
                    description: {
                        required: "Please enter the job description"
                    }
                },
                submitHandler: function(form){
                    form.submit();
                }
            });

            function add_rules(){
                $("#contacts").rules('add', {
                            required: true
                        }
                );
                $("#mobile").rules('add', {
                            checkMobile: ['jobform #phone']
                        }
                );
                $("#phone").rules('add', {
                            checkPhone: true
                        }
                );
                $("#fax").rules('add', {
                            checkFax: true
                        }
                );
                $("#email").rules('add', {
                            email: true
                        }
                );
            }

            function remove_rules(){
                $("#contacts").rules('remove');
                $("#mobile").rules('remove');
                $("#phone").rules('remove');
                $("#fax").rules('remove');
                $("#email").rules('remove');
            }

            $("input[name='contact_info']").click(function(){
                switch($(this).val()){
                    case '2':
                        add_rules();
                        $("#consection_show").show();
                        break;
                    default:
                        $("#consection_show").hide();
                        remove_rules();
                }
            });
            //$("#description").rules("remove");

            //设置单选框的值
            if('{{old("contact_info")}}' == '2'){
                $("input:radio[name='contact_info'][value='2']").attr("checked",true);
                add_rules();
                $("#consection_show").show();
            }

            $(".option_add").click(function(){
                var dopen = layer.open({
                    type: 1,
                    title: "new department",
                    skin: 'layui-layer-rim', //加上边框
                    area: ['570px', '420px'], //宽高
                    content: '<div class="department"><form name="departmentform" id="departmentform" onSubmit="return false" method="post" >{!! csrf_field() !!}<dl><dt><em>*</em><span>Department</span></dt><dd><input name="name" type="text" id="name" style="width:260px;"></dd><dd class="errinfo"></dd></dl><dl><dt><em>*</em><span>contacts</span></dt><dd><input name="contacts"  value="{{$companyBasic->contacts or ""}}" type="text" id="contacts" style="width:120px;"></dd><dd class="errinfo"></dd></dl><dl><dt><em>*</em><span>mobile</span></dt><dd><input name="mobile"  value="{{$companyBasic->mobile or ""}}" type="text" id="mobile" style="width:200px;"></dd><dd class="errinfo"></dd></dl><dl><dt><em>*</em><span>phone</span></dt><dd><input name="phone" value="{{$companyBasic->phone or ""}}" type="text" id="phone" placeholder="The format is like 0576-82441111" style="width:200px;"></dd><dd class="errinfo"></dd></dl><dl><dt><em></em><span>fax</span></dt><dd><input name="fax" type="text" id="fax" value="{{$companyBasic->fax or ""}}" style="width:200px;"></dd><dd class="errinfo"></dd></dl><dl><dt><em></em><span>Email</span></dt><dd><input name="email"  value="{{$companyBasic->email or ""}}" type="text" id="email" style="width:260px;"></dd><dd class="errinfo"></dd></dl><div class="department_save"><span><input type="submit"  name="savenav" id="savenav" value="Save"></span></div></div>'
                });
                //企业会员表单验证 使用jQuery Validate 插件进行验证
                $('#departmentform').validate({
                    //指定使用什么标签标记错误。
                    errorElement: "span",
                    //一个函数，可以自定义错误放到哪里。
                    errorPlacement: function(error, element){
                        //console.log(element.attr("name"));
                        $(element).parents('dl').find(".errinfo").append(error);
                    },
                    //自定义错误消息
                    tipPlacement: function(element, tip){
                        $(element).parents('dl').find(".errinfo").append(tip);
                    },
                    //通过验证后执行的函数
                    success: function(label){
                        if(label.parents('dl').find('dd input').val() != ''){
                            label.text('ok!').addClass('success');
                        }
                    },
                    //未验证后执行的函数
                    highlight: function(element, errorClass){
                        $(element).closest("dl").find("dd.errinfo").find('span').removeClass('success');
                    },
                    ignore: "",
                    //薪资合并提示
                    //groups: {
                    //salary: "salary_above salary_below"   //只能验证一个取消使用
                    //},
                    //js上面添加验证规则
                    rules: {
                        name: {
                            required: true
                        },
                        contacts: {
                            required: true
                        },
                        mobile: {
                            checkMobile: ['departmentform #phone']
                        },
                        phone: {
                            checkPhone: true
                        },
                        fax: {
                            checkFax: true
                        },
                        email: {
                            email: true
                        }
                    },
                    //错误信息提示修改
                    messages: {
                        name: {
                            required: "Please enter the name of the department"
                        },
                        contacts: {
                            required: "Please enter the contact"
                        }
                    },
                    submitHandler: function(form){

                        $.ajax({
                            type: "POST",
                            url: "{{asset('company/department/store')}}",
                            data: $("#departmentform").serialize(),
                            dataType: "json",
                            success: function(msg){
                                option_department.splice(1, 0, {"text": msg.name, "value": msg.id});
                                department_select.resetOptions(option_department);
                                department_select.resetSelected(msg.id);
                                layer.close(dopen);
                            }
                        });
                    }
                });
            });
        });

        function posCateInput2(randfrm, selmod){
            var arrobj = {
                objId: '#jobFun' + randfrm,					        //当前显示内容的ID值
                objCate: '#funCate' + randfrm,					        //当前页面弹出层显示要追加的岗位类别内容
                objTwoCate: '#twofunCate' + randfrm,				    //当前页面要追加的岗位类别内容
                objChcekbox: '#jobFunctions' + randfrm,			    //当前弹出层 复选框checkbox的前缀名id值
                objSearchChcekbox: '#jobFunctionSearch' + randfrm,     //当前弹出层 复选框checkbox的前缀名id值 搜索的复选框
                objSelect: 'funSelect' + randfrm,				        //当前弹出层 追加到弹出要追加的内容里面的ID前缀值
                //objTwoSelect:'twofunSelect'+randfrm,			    //当前页面  追加到当前页面要追加的内容里面的ID前缀值
                objPostCate: '#jobsort',                             //当前页面  追加到当前页面input要追加的内容里面的ID前缀值
                objArr: ["#job_category1" + randfrm, "#job_category2" + randfrm, "#job_category3" + randfrm, "#job_category4" + randfrm, "#job_category5" + randfrm], //当前隐藏表单
                keep_sceen: '#keep_sceen',					        //遮掩层
                objLevel: '2',								        //设置当前显示的级别
                objType: '1',								        //设置当前显示的类型
                objMod: selmod,                                      //选择模式 当传入值为1时。出现大类不限
                objInpaLength: '5'								    //设置当前input 表单选项的个数
            };
            cateObj.showextend(randfrm, arrobj);
        }

        function workplaceInput2(randfrm){
            var workarr = {
                objId: '#jobLoc' + randfrm,					//当前显示内容的ID值
                objProvince: 'address_P' + randfrm,	        //当前select省份
                objCity: 'address_C' + randfrm,		        //当前select市区县
                objCate: '#locCate' + randfrm,					//当前页面弹出层显示要追加的工作地区类别内容
                objTwoCate: '#twolocCate' + randfrm,		    //当前页面要追加的工作地区类别内容
                objChcekbox: '#jobLocations' + randfrm,	    //当前弹出层 复选框checkbox的前缀名id值
                objSelect: 'locSelect' + randfrm,				//当前弹出层 追加到弹出要追加的内容里面的ID前缀值
                objTwoSelect: 'twolocSelect' + randfrm,	    //当前页面  追加到当前页面要追加的内容里面的ID前缀值
                objPostCate: '#workplace',					//当前页面  追加到当前页面input要追加的内容里面的ID前缀值
                objArr: ["#location1" + randfrm, "#location2" + randfrm, "#location3" + randfrm, "#location4" + randfrm, "#location5" + randfrm], //当前隐藏表单
                keep_sceen: '#keep_sceen',					//遮掩层
                objLevel: '3',								//设置当前显示的级别
                objInpaLength: '5'							//设置当前input 表单选项的个数
            };
            workObj.showextend(randfrm, workarr);
        }
    </script>
@endsection